package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/*房间实体
 * */
@TableName("t_room")
public class RoomBean {
    @TableId(value = "pk_roomId",type = IdType.AUTO)
    private Integer id;//房间id
    @TableField("r_name")
    private String addName;//房间地址
    @TableField("r_capacity")
    private Integer capacity;//容纳人数
    @TableField(exist = false)//必须加，标识该属性不是数据库表的列
    private Integer resided;//已住人数
    @TableField("r_status")
    private String status = "正常";//状态
    @TableField("r_roomsex")
    private String roomSex;//房间类型
    @TableField(exist = false)
    private List<StudentBean> studentList;//学生集合

    public RoomBean(String addName, Integer capacity, String status, String roomSex) {
        this.addName = addName;
        this.capacity = capacity;
        this.status = status;
        this.roomSex = roomSex;
    }

    public RoomBean() {
    }

    public RoomBean(Integer id, String addName, Integer capacity, Integer resided, String status, String roomSex, List<StudentBean> studentList) {
        this.id = id;
        this.addName = addName;
        this.capacity = capacity;
        this.resided = resided;
        this.status = status;
        this.roomSex = roomSex;
        this.studentList = studentList;
    }



    public RoomBean(String addName, Integer capacity, Integer resided, String status, String roomSex, List<StudentBean> studentList) {
        this.addName = addName;
        this.capacity = capacity;
        this.resided = resided;
        this.status = status;
        this.roomSex = roomSex;
        this.studentList = studentList;
    }

    public RoomBean(Integer id, String addName) {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAddName() {
        return addName;
    }

    public void setAddName(String addName) {
        this.addName = addName;
    }

    public Integer getCapacity() {
        return capacity;
    }

    public void setCapacity(Integer capacity) {
        this.capacity = capacity;
    }

    public Integer getResided() {
        return resided;
    }

    public void setResided(Integer resided) {
        this.resided = resided;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRoomSex() {
        return roomSex;
    }

    public void setRoomSex(String roomSex) {
        this.roomSex = roomSex;
    }

    public List<StudentBean> getStudentList() {
        return studentList;
    }

    public void setStudentList(List<StudentBean> studentList) {
        this.studentList = studentList;
    }

    @Override
    public String toString() {
        return "RoomBean{" +
                "id=" + id +
                ", addName='" + addName + '\'' +
                ", capacity=" + capacity +
                ", resided=" + resided +
                ", status='" + status + '\'' +
                ", roomSex='" + roomSex + '\'' +
                ", studentList=" + studentList +
                '}';
    }
}
